#!/usr/bin/envpython
#-*-coding:utf-8-*-
import sys,os,re,json
sys.path.append('../manager/')
os.environ['DJANGO_SETTINGS_MODULE']='manager.settings'
from manager import settings
import django
django.setup()
from san import models
def Re(res,total,id = "1"):
    if id == "1":
        data = re.findall(str(res),total)
    if id == "2":
        data = re.findall(str(res),total,re.S)
    return data
a = models.Wwn.objects.get_or_create(wwn="50:00:00:e0:d4:32:c2:83")
a[0].wwnname = "333e"
print(a[0])
if a[1]:
    print("zhen")
